package org.shj.algorithm.tree;

/**
 * @author Shen Huang Jian
 * @date 2019/5/21
 */
public class Node<T> {

    private T val;

    private Node<T> leftChild;

    private Node<T> rightChild;

    private Node<T> parent;

    private int height;

    public Node(T val){
        this.val = val;
    }


    public T getVal() {
        return val;
    }

    public void setVal(T val) {
        this.val = val;
    }

    public Node<T> getLeftChild() {
        return leftChild;
    }

    public void setLeftChild(Node<T> leftChild) {
        this.leftChild = leftChild;
    }

    public Node<T> getRightChild() {
        return rightChild;
    }

    public void setRightChild(Node<T> rightChild) {
        this.rightChild = rightChild;
    }

    public Node<T> getParent() {
        return parent;
    }

    public void setParent(Node<T> parent) {
        this.parent = parent;
    }

    public int getHeight() {
        return height;
    }

    public void setHeight(int height) {
        this.height = height;
    }
}
